// part1:C06:ex6.7.cpp
#include <iostream>
#include <type_traits>

unsigned myCount1(void) {
  static unsigned iCnt = -1;
  ++iCnt;
  return iCnt;
} 

int main(void) {
  using namespace std;
  cout << "Enter some characters:\n";
  char ch;

  while (cin >> ch) {
    cout << "myCount() had ran : " << myCount1() << endl;
    
  }

  return 0;
}
